from typing import List, Optional
from uuid import UUID
from pydantic import BaseModel


class RoleCreate(BaseModel):
    code: str
    name: str
    description: Optional[str] = None
    enabled: bool = True


class RoleRead(BaseModel):
    id: UUID
    code: str
    name: str
    description: Optional[str] = None
    enabled: bool


class RoleMenuSet(BaseModel):
    menu_ids: List[UUID]